﻿<%@ Control Language="VB" AutoEventWireup="false" CodeFile="SearchCleanPlan.ascx.vb" Inherits="WebForm_StepQuery_SearchCleanPlan" %>
<table>
    <tr>
        <td align="right">
            <asp:Label ID="lblAnnual" runat="server" meta:resourcekey="lblAnnual"></asp:Label>
        </td>
        <td align="left">
            <My:AnnualControl ID="AnnualControl1" runat="server" />
        </td>
    </tr>
    <tr>
        <td align="right">
            <asp:Label ID="lblOrganization" runat="server" meta:resourcekey="lblOrganization"></asp:Label>
        </td>
        <td align="left">
            <asp:DropDownList ID="ddlOrganization" runat="server" AutoPostBack="false">
            </asp:DropDownList>
        </td>
        <td align="left">
            <asp:Button ID="btnQuery" CssClass="button" SkinID="button" runat="server" meta:resourcekey="btnQuery" />
        </td>
    </tr>
</table>
<br />
<asp:GridView id="ParentGridView" SkinID="pager2" runat="server" PageSize="10" AllowPaging="True" GridLines="Both" 
CellPadding="3" BorderWidth="3px" BorderStyle="None" BorderColor="#336666" BackColor="White" DataKeyNames="PlanHeaderID,OrganizationID">
            <Columns>
                <asp:TemplateField HeaderText="No.">
                   <ItemTemplate>
                   <%#ParentGridView.PageIndex * ParentGridView.PageSize + ParentGridView.Rows.Count + 1%>
                   </ItemTemplate>
                   <ItemStyle HorizontalAlign="Center" />
                   <ItemStyle Width="40px" />
                </asp:TemplateField>
                <asp:TemplateField meta:resourcekey="bfOrganizationName">
                    <ItemTemplate>
                        <asp:Label ID="lbl_OrganizationName" runat="Server" Text='<%# Eval("OrganizationName") %>' />
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" />
                    <ItemStyle Width="80px" />
                </asp:TemplateField>

                <asp:TemplateField meta:resourcekey="bfItemType">
                    <ItemTemplate>
                        <asp:Panel ID="pnlPlus" runat="server">
                            <table width="100%" border="0" cellspacing="0" cellpadding="0" id="tb">
                            <tr>
                                <td align="left" style="padding-left: 10px;">
                                    <asp:ImageButton ID="imgPlus" runat="server" ImageAlign="AbsMiddle" ImageUrl="~/images/Minus.gif" AlternateText="(Show Details...)" />
                                    <asp:LinkButton ID="lbtnViewContent" runat="server"></asp:LinkButton>
                                    <asp:Label ID="lbl_Subject" runat="Server" Text='<%# Eval("NewSubject") %>' />
                                </td>
                            </tr>
                            </table>
                        </asp:Panel>
                        <asp:Panel ID="pnlMinus" runat="server">    
                            <asp:GridView ID="ChildGridView" OnRowDataBound="ChildGridView_RowDataBound" DataKeyNames="PlanID" SkinID="pager2" runat="server" AllowPaging="true">
                                <Columns>
                                    <asp:TemplateField meta:resourcekey="bfItemTypeText">
                                        <ItemTemplate>
                                            <asp:Label ID="lbl_ItemTypeText" runat="Server" Text='<%# Eval("ItemTypeText") %>' />
                                        </ItemTemplate>
                                        <ItemStyle HorizontalAlign="Center" />
                                        <ItemStyle Width="80px" />
                                    </asp:TemplateField>
                                        
                                    <asp:TemplateField meta:resourcekey="bfPlanName">
                                        <ItemTemplate>
                                            <asp:Panel ID="pnlPlus" runat="server">
                                                <table width="100%" border="0" cellspacing="0" cellpadding="0" id="Table1">
                                                <tr>
                                                    <td align="left" style="padding-left: 10px;">
                                                        <asp:ImageButton ID="imgPlus" runat="server" ImageAlign="AbsMiddle" ImageUrl="~/images/Minus.gif" AlternateText="(Show Details...)" />
                                                        <asp:LinkButton ID="lbtnViewContent" runat="server"></asp:LinkButton>
                                                        <asp:Label id="Label1" runat="server" Text='<%# Bind("StartDate", "{0:yyyy/MM/dd}") %>'></asp:Label>~<asp:Label id="Label2" runat="server" Text='<%# Bind("EndDate", "{0:yyyy/MM/dd}") %>'></asp:Label>
                                                        <asp:Label ID="lbl_PlanName" runat="Server" Text='<%# Eval("PlanName") %>' />                                                    
                                                    </td>
                                                </tr>
                                                </table>
                                            </asp:Panel> 
                                            <asp:Panel ID="pnlMinus" runat="server"> 
                                                <asp:GridView ID="VOGridView" OnRowDataBound="VOGridView_RowDataBound" DataKeyNames="PlanID,VUOrganizationID" SkinID="pager2" runat="server" AllowPaging="true">
                                                    <Columns>
                                                        <asp:TemplateField meta:resourcekey="bfVOrganizationName">
                                                            <ItemTemplate>
                                                                <asp:Panel ID="pnlPlus" runat="server">
                                                                    <table width="100%" border="0" cellspacing="0" cellpadding="0" id="Table1">
                                                                    <tr>
                                                                        <td align="left" style="padding-left: 10px;">
                                                                            <asp:ImageButton ID="imgPlus" runat="server" ImageAlign="AbsMiddle" ImageUrl="~/images/Minus.gif" AlternateText="(Show Details...)" />
                                                                            <asp:LinkButton ID="lbtnViewContent" runat="server"></asp:LinkButton>
                                                                            <asp:Label ID="lbl_VOrganizationName" runat="Server" Text='<%# Eval("VOrganizationName") %>' />                                                  
                                                                        </td>
                                                                    </tr>
                                                                    </table>
                                                                </asp:Panel> 
                                                                <asp:Panel ID="pnlMinus" runat="server"> 
                                                                    <asp:GridView ID="WHGridView" OnRowDataBound="WHGridView_RowDataBound" OnRowCommand="WHGridView_RowCommand" DataKeyNames="PlanID,WorkHeaderID,VUOrganizationID,DirectUOrganizationID,LeaderID" SkinID="pager2" runat="server" AllowPaging="true">
                                                                        <Columns>
                                                                            <asp:TemplateField meta:resourcekey="bfLeaderName">
                                                                                <ItemTemplate>
                                                                                    <asp:Label ID="lbl_LeaderName" runat="Server" Text='<%# Eval("LeaderName") %>' />      
                                                                                </ItemTemplate>
                                                                                <ItemStyle HorizontalAlign="Center" />
                                                                                <ItemStyle Width="80px" />
                                                                            </asp:TemplateField>
                                                                            <asp:TemplateField meta:resourcekey="bfWorkStartDate">
                                                                                <ItemTemplate>
                                                                                    <asp:Label id="Label1" runat="server" Text='<%# Bind("WorkStartDate", "{0:yyyy/MM/dd}") %>' />
                                                                                </ItemTemplate>
                                                                                <ItemStyle HorizontalAlign="Center" />
                                                                                <ItemStyle Width="80px" />
                                                                            </asp:TemplateField>
                                                                            <asp:TemplateField>
                                                                                <ItemTemplate>
                                                                                    <asp:LinkButton ID="lbtnWorkHeader" CommandName="WorkHeader" runat="server" meta:resourcekey="bfWorkHeader"></asp:LinkButton>
                                                                                </ItemTemplate>
                                                                                <ItemStyle HorizontalAlign="Center" />
                                                                            </asp:TemplateField>
                                                                        </Columns>
                                                                    </asp:GridView>
                                                                </asp:Panel>
                                                                <ajaxToolkit:CollapsiblePanelExtender ID="cpeDemo" runat="Server" TargetControlID="pnlMinus"
                                                                    ExpandControlID="pnlPlus" CollapseControlID="pnlPlus" Collapsed="True"  TextLabelID="lbtnViewContent"
                                                                    ImageControlID="imgPlus" ExpandedText="隱藏" CollapsedText="展開"
                                                                    ExpandedImage="~/images/minus.gif" CollapsedImage="~/images/plus.gif"
                                                                    SuppressPostBack="true">
                                                                </ajaxToolkit:CollapsiblePanelExtender>                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                    </Columns>
                                                </asp:GridView>
                                            </asp:Panel>
                                            <ajaxToolkit:CollapsiblePanelExtender ID="cpeDemo" runat="Server" TargetControlID="pnlMinus"
                                                ExpandControlID="pnlPlus" CollapseControlID="pnlPlus" Collapsed="True"  TextLabelID="lbtnViewContent"
                                                ImageControlID="imgPlus" ExpandedText="隱藏" CollapsedText="展開"
                                                ExpandedImage="~/images/minus.gif" CollapsedImage="~/images/plus.gif"
                                                SuppressPostBack="true">
                                            </ajaxToolkit:CollapsiblePanelExtender>                                            </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                            </asp:GridView>
                        </asp:Panel>
                        <ajaxToolkit:CollapsiblePanelExtender ID="cpeDemo" runat="Server" TargetControlID="pnlMinus"
                            ExpandControlID="pnlPlus" CollapseControlID="pnlPlus" Collapsed="True"  TextLabelID="lbtnViewContent"
                            ImageControlID="imgPlus" ExpandedText="隱藏" CollapsedText="展開"
                            ExpandedImage="~/images/minus.gif" CollapsedImage="~/images/plus.gif"
                            SuppressPostBack="true">
                        </ajaxToolkit:CollapsiblePanelExtender>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>